home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / code / r3filer.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  7.2 KB  |  254 lines

  1.  
  2. // JavaScript wrapper for r3filer.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_FILER_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_FILER = 98;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Ask filer to save project
  16. // Returns: Boolean, TRUE if succeeded
  17. // p3: Tag[], R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Format
  18.  
  19. R3FIRM_SAVEAS = 98000;
  20.  
  21. function mR3FIRM_SAVEAS(p3) {
  22.   return   Do(this.r3obj, 98000, p3, R3TID_TAG, R3TNF_ARRAY);
  23. }
  24.  
  25. // Description: Saves project with the default project name. The default name can be set using
  26. //      the R3FIRA_FileName tag.
  27. // Returns: Boolean, TRUE if succeeded
  28.  
  29. R3FIRM_SAVE = 98001;
  30.  
  31. function mR3FIRM_SAVE() {
  32.   return   DoA(this.r3obj, 98001, 0, R3TID_INTEGER, 0);
  33. }
  34.  
  35. // Description: Loads project. Sections, filename and replace information must    * be given in the tag list.
  36. // Returns: Boolean, TRUE if succeeded
  37. // p3: Tag[], R3FIRA_FileName, R3FIRA_Sections, R3FIRA_Replace.
  38.  
  39. R3FIRM_LOAD = 98002;
  40.  
  41. function mR3FIRM_LOAD(p3) {
  42.   return   Do(this.r3obj, 98002, p3, R3TID_TAG, R3TNF_ARRAY);
  43. }
  44.  
  45.  
  46. R3FIRCM_REGISTERSAVER = 98005;
  47.  
  48. function mR3FIRCM_REGISTERSAVER() {
  49.   DoA(this.r3obj, 98005, 0, R3TID_INTEGER, 0);
  50. }
  51.  
  52.  
  53. R3FIRCM_REGISTERLOADER = 98006;
  54.  
  55. function mR3FIRCM_REGISTERLOADER() {
  56.   DoA(this.r3obj, 98006, 0, R3TID_INTEGER, 0);
  57. }
  58.  
  59. // Description: Fetch 'section bit' corresponding the given chunk id
  60. // Returns: Integer, ordnum of the bit, bit can be generated as 1<<bit
  61. // p3: Integer, chunk id (created with R3MakeID()
  62.  
  63. R3FIRM_FETCHSECTIONBIT = 98009;
  64.  
  65. function mR3FIRM_FETCHSECTIONBIT(p3) {
  66.   return   DoA(this.r3obj, 98009, p3, R3TID_INTEGER, 0);
  67. }
  68.  
  69.  
  70. R3FIRCM_REGISTEREXTERNALFILE = 98010;
  71.  
  72. function mR3FIRCM_REGISTEREXTERNALFILE() {
  73.   DoA(this.r3obj, 98010, 0, R3TID_INTEGER, 0);
  74. }
  75.  
  76. // Description: Open file format for reading. No actual data is read.
  77. // Returns: Object, file format object
  78. // p3: Tag[], R3FIRA_FileName    
  79.  
  80. R3FIRM_OPENFORMAT = 98012;
  81.  
  82. function mR3FIRM_OPENFORMAT(p3) {
  83.   return R3ToJS(  Do(this.r3obj, 98012, p3, R3TID_TAG, R3TNF_ARRAY));
  84. }
  85.  
  86. // Description: Save the current project as autosave file
  87. // Returns: Boolean, true if succeeded, FALSE for error.
  88.  
  89. R3FIRM_AUTOSAVE = 98013;
  90.  
  91. function mR3FIRM_AUTOSAVE() {
  92.   return   DoA(this.r3obj, 98013, 0, R3TID_INTEGER, 0);
  93. }
  94.  
  95. // Description: Check if autosave file for given file name is newer
  96. // Returns: Boolean, true if autosave file is newer. FALSE if autosave file is older or it
  97. //      doesn't exist.
  98. // p3: String, filename    
  99.  
  100. R3FIRM_ISAUTOSAVENEWER = 98014;
  101.  
  102. function mR3FIRM_ISAUTOSAVENEWER(p3) {
  103.   return   DoA(this.r3obj, 98014, p3, R3TID_STRING, 0);
  104. }
  105.  
  106. // Description: Make autosave file name
  107. // p1: Integer, auto save name
  108. // p3: Integer, base name    
  109.  
  110. R3FIRM_MAKEAUTOSAVENAME = 98015;
  111.  
  112. function mR3FIRM_MAKEAUTOSAVENAME(p1, p3) {
  113.   DoA2(this.r3obj, 98015, p1, R3TID_BYTE, 0, p3, R3TID_BYTE, 0);
  114. }
  115.  
  116. // Description: Notify this object for each load / save operations
  117. // Returns: Boolean, true if succeeded.
  118. // p3: Tag[], R3FIRA_PreNotifyMethod, R3FIRA_NotifyMethod, R3FIRA_NotifyObject,    
  119.  
  120. R3FIRM_ADDNOTIFICATION = 98016;
  121.  
  122. function mR3FIRM_ADDNOTIFICATION(p3) {
  123.   return   Do(this.r3obj, 98016, p3, R3TID_TAG, R3TNF_ARRAY);
  124. }
  125.  
  126. // Description: Remove object from the notification list
  127. // Returns: Boolean, true if found.
  128. // p3: Tag[], R3FIRA_PreNotifyMethod, R3FIRA_NotifyMethod, R3FIRA_NotifyObject,    
  129.  
  130. R3FIRM_REMOVENOTIFICATION = 98017;
  131.  
  132. function mR3FIRM_REMOVENOTIFICATION(p3) {
  133.   return   Do(this.r3obj, 98017, p3, R3TID_TAG, R3TNF_ARRAY);
  134. }
  135.  
  136. // Description: Enumerate loader objects
  137. // p1: Object, callback object
  138. // p2: Integer, callback method
  139. // p3: Object, caller specific data    
  140.  
  141. R3FIRM_ENUMLOADERS = 98018;
  142.  
  143. function mR3FIRM_ENUMLOADERS(p1, p2, p3) {
  144.   DoA3(this.r3obj, 98018, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  145. }
  146.  
  147.  
  148.  
  149.  
  150. R3FIRA_FileName = 98500;
  151. function SetR3FIRA_FileName(value) {
  152.   R3Set(this.r3obj, R3FIRA_FileName, value, R3TID_STRING, 0); 
  153. }
  154.  
  155. function GetR3FIRA_FileName() {
  156.   return R3Get(this.r3obj, R3FIRA_FileName, R3TID_STRING, 0); 
  157. }
  158.  
  159. R3FIRA_Sections = 98501;
  160. function SetR3FIRA_Sections(value) {
  161.   R3Set(this.r3obj, R3FIRA_Sections, value, R3TID_INTEGER, 0); 
  162. }
  163.  
  164. var R3FIRA_Replace = 98502; // Boolean
  165. var R3FIRA_Format = 98503; // Integer
  166. R3FIRA_SectionNames = 98504;
  167. function GetR3FIRA_SectionNames() {
  168.   return R3Get(this.r3obj, R3FIRA_SectionNames, R3TID_LIST, R3TNF_ARRAY); 
  169. }
  170.  
  171. R3FIRA_SaverNames = 98505;
  172. function GetR3FIRA_SaverNames() {
  173.   return R3Get(this.r3obj, R3FIRA_SaverNames, R3TID_LIST, R3TNF_ARRAY); 
  174. }
  175.  
  176. var R3FIRA_WriteMth = 98507; // Integer
  177. var R3FIRA_ReadMth = 98508; // Integer
  178. var R3FIRA_ExportMth = 98509; // Integer
  179. var R3FIRA_ImportMth = 98510; // Integer
  180. var R3FIRA_Model = 98518; // Object
  181. R3FIRA_Selected = 98519;
  182. function SetR3FIRA_Selected(value) {
  183.   R3Set(this.r3obj, R3FIRA_Selected, value, R3TID_INTEGER, 0); 
  184. }
  185.  
  186. function GetR3FIRA_Selected() {
  187.   return R3Get(this.r3obj, R3FIRA_Selected, R3TID_INTEGER, 0); 
  188. }
  189.  
  190. R3FIRA_NotifyObject = 98521;
  191. function SetR3FIRA_NotifyObject(value) {
  192.   R3Set(this.r3obj, R3FIRA_NotifyObject, value, R3TID_OBJECT, 0); 
  193. }
  194.  
  195. R3FIRA_NotifyMethod = 98522;
  196. function SetR3FIRA_NotifyMethod(value) {
  197.   R3Set(this.r3obj, R3FIRA_NotifyMethod, value, R3TID_INTEGER, 0); 
  198. }
  199.  
  200. var R3FIRA_CollectExternalFiles = 98525; // Boolean
  201. R3FIRA_ProgressIndicator = 98528;
  202. function SetR3FIRA_ProgressIndicator(value) {
  203.   R3Set(this.r3obj, R3FIRA_ProgressIndicator, value, R3TID_OBJECT, 0); 
  204. }
  205.  
  206. var R3FIRA_Notify = 98529; // Boolean
  207. R3FIRA_PreNotifyMethod = 98530;
  208. function SetR3FIRA_PreNotifyMethod(value) {
  209.   R3Set(this.r3obj, R3FIRA_PreNotifyMethod, value, R3TID_INTEGER, 0); 
  210. }
  211.  
  212. var R3FIRA_FormatClid = 98531; // Integer
  213. var R3FIRA_SectionsDone = 98532; // Integer[]
  214. var R3FIRA_NoRecentFileEntry = 98533; // Boolean
  215. var R3FIRERR_CHECKSUM = 98500;
  216.  
  217.  
  218. function r3Filer () { 
  219.    this.base = r3God;
  220.    if(arguments.length) {
  221.       this.base(R3CLID_FILER, arguments);
  222.    }
  223.    // Methods
  224.    this.SAVEAS=mR3FIRM_SAVEAS;
  225.    this.SAVE=mR3FIRM_SAVE;
  226.    this.LOAD=mR3FIRM_LOAD;
  227.    this.REGISTERSAVER=mR3FIRCM_REGISTERSAVER;
  228.    this.REGISTERLOADER=mR3FIRCM_REGISTERLOADER;
  229.    this.FETCHSECTIONBIT=mR3FIRM_FETCHSECTIONBIT;
  230.    this.REGISTEREXTERNALFILE=mR3FIRCM_REGISTEREXTERNALFILE;
  231.    this.OPENFORMAT=mR3FIRM_OPENFORMAT;
  232.    this.AUTOSAVE=mR3FIRM_AUTOSAVE;
  233.    this.ISAUTOSAVENEWER=mR3FIRM_ISAUTOSAVENEWER;
  234.    this.MAKEAUTOSAVENAME=mR3FIRM_MAKEAUTOSAVENAME;
  235.    this.ADDNOTIFICATION=mR3FIRM_ADDNOTIFICATION;
  236.    this.REMOVENOTIFICATION=mR3FIRM_REMOVENOTIFICATION;
  237.    this.ENUMLOADERS=mR3FIRM_ENUMLOADERS;
  238.  
  239.    // Attributes
  240.    this.GetFileName=GetR3FIRA_FileName;
  241.    this.SetFileName=SetR3FIRA_FileName;
  242.    this.SetSections=SetR3FIRA_Sections;
  243.    this.GetSectionNames=GetR3FIRA_SectionNames;
  244.    this.GetSaverNames=GetR3FIRA_SaverNames;
  245.    this.GetSelected=GetR3FIRA_Selected;
  246.    this.SetSelected=SetR3FIRA_Selected;
  247.    this.SetNotifyObject=SetR3FIRA_NotifyObject;
  248.    this.SetNotifyMethod=SetR3FIRA_NotifyMethod;
  249.    this.SetProgressIndicator=SetR3FIRA_ProgressIndicator;
  250.    this.SetPreNotifyMethod=SetR3FIRA_PreNotifyMethod;
  251. }
  252.  
  253. r3Filer.prototype=new r3Root;
  254. // r3filer.h_H